package com.ym.b2b.order.dao;

import java.util.List;

import org.springframework.dao.DataAccessException;

import com.ym.b2b.order.sqlbean.EmSShoppingCart;
import com.zc.commons.base.Page;

public interface EmShoppingCartDao {

    /**
     * @Title: ajaxAddShoppingCart
     * @Description: 加入购物车
     */
    public Object addShoppingCart(EmSShoppingCart emSShoppingCart) throws DataAccessException;

    /**
     * @Title: updateShoppingCart
     * @Description: 修改购物车
     */
    public int updateShoppingCart(EmSShoppingCart emSShoppingCart) throws DataAccessException;

    /**
     * @Title: searchPageShoppingCart
     * @Description: 购物车分页 列表
     */
    public Page<EmSShoppingCart> searchPageShoppingCart(EmSShoppingCart emSShoppingCart, Page<EmSShoppingCart> page)
                                                                                                                    throws DataAccessException;

    /**
     * @Title: 获取 购物车 列表 is_tuitai 为必填项
     */
    public List<EmSShoppingCart> searchShoppingCart(EmSShoppingCart emSShoppingCart) throws DataAccessException;

    public Long searchPageShoppingCartNum(EmSShoppingCart emSShoppingCart) throws DataAccessException;

    /**
     * @Title: isExitShoppintCart
     * @Description: 购物车商品是否存在
     */
    public Integer isExitShoppintCart(EmSShoppingCart emSShoppingCart) throws DataAccessException;

    public int deleteShoppingCart(EmSShoppingCart emSShoppingCart) throws DataAccessException;

    /**
     * @Title: countShoppintCartTotalMoeny
     * @Description: 当前客户 购物车总金额
     */
    public Double countShoppintCartTotalMoeny(EmSShoppingCart emSShoppingCart) throws DataAccessException;

    /**
     * @Title: 获取购物车 其他信息 按需要组装(暂时 没有用到)
     */
    public EmSShoppingCart showEmSShoppingCartOther(EmSShoppingCart emSShoppingCart) throws DataAccessException;

    /**
     * 采购商 在购物车的数量
     * 
     * @Title: countShoppingCartNum
     */
    public Integer countShoppingCartNum(String buyerCode) throws DataAccessException;

}
